package com.epic.rest;

import com.epic.inter.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.*;
import javax.ws.rs.core.Context;

@Path("/v1/form")
@Component("FormResource")
public class FormResources {

    @Autowired
    private IUserService iUserService;

    @Path("test")
    @GET
    @Produces("application/json;charset=UTF-8")
    public String test(@Context HttpServletRequest request,
                       @QueryParam("args") String args){

        try{
            return "hello ok";
        }catch (Exception e){
        }
        return "error";
    }

    @Path("test2")
    @GET
    @Produces("application/json;charset=UTF-8")
    public String test2(@Context HttpServletRequest request){

        try{
            return  iUserService.testUser("test");
        }catch (Exception e){
        }
        return "error";
    }
    /**
     * 事件研判->通报预警
     * 资讯审批
     * 应急响应流程
     * 应急指挥
     * 实例保存在process_relation
     */
}
